package com.cloud.bean.goods;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author liuyuan
 * @since 2022-11-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("g_goods")
public class Goods extends Model<Goods> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品的名称
     */
    private String name;

    private String imgUrl;

    /**
     * 市场价格
     */
    private BigDecimal marketPrice;

    /**
     * 销售价格
     */
    private BigDecimal price;

    /**
     * 商品进价
     */
    private BigDecimal purchasePrice;

    /**
     * 数量
     */
    private Integer num;

    /**
     * active上架 unactive下架
     */
    private String status;

    /**
     * 商品的描述
     */
    private String make;

    @TableField("pushDate")
    private LocalDateTime pushDate;

    @TableField("offDate")
    private LocalDateTime offDate;

    @TableField("createDate")
    private LocalDateTime createDate;

    @TableField("updateData")
    private LocalDateTime updateData;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
